package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.task;

import cn.iocoder.yudao.framework.common.util.string.StrUtils;
import lombok.extern.slf4j.Slf4j;
import org.flowable.task.service.delegate.DelegateTask;
import org.springframework.stereotype.Component;

/**
 * 流程任务分配人发送企业微信消息
 */
@Slf4j
@Component("weworkSpringExpressionTaskListener")
public class WeworkSpringExpressionTaskListener {

    public void notify(DelegateTask delegateTask){
        log.info("企业微信通知信息：assignee:" + delegateTask.getAssignee() + "; category:" + delegateTask.getCategory() +
                "; id:" + delegateTask.getId() + "; name:" + delegateTask.getName() + "; owner:" + delegateTask.getOwner()
                + "; candidates:" + delegateTask.getCandidates()
                + "; eventName:" + delegateTask.getEventName() + "; definitionKey:" + delegateTask.getTaskDefinitionKey() +
                "; ProcessInstanceId:" + delegateTask.getProcessInstanceId() + "; ProcessDefinitionId:" + delegateTask.getProcessDefinitionId());
        // TODO 后续处理超时提醒
    }
}
